<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>{$title}系统控制台 - 主页</title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;/ie.html"/>
    <![endif]-->
    <link href="/public/plugins/bootstrap/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/plugins/fontawesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/plugins/animate/animate.css" rel="stylesheet">
    <link href="/public/system/css/style.css" rel="stylesheet">
    <script src="/public/plugins/jquery.min.js?v=2.1.4"></script>
    <style>
        #side-menu i{width:14px;text-align:right;}
        .nav-header .text-muted{font-size:12px;line-height:24px;}
        .navbar-static-side{background:url("/public/system/img/header-profile.jpg") no-repeat top right;background-size:220px 100%}
        .count-info{color:#777;}
    </style>
    {eq name="userinfo['utype']" value="system"}
    <style>
        .nav-header {
            padding: 20px 0;
           /* background: url("/public/system/img/header-profile.jpg") no-repeat;*/
        }
        .nav > li.active {  border-left: 4px solid #19aa8d;  background:none;  }
        .nav > li > a{color:#fff;}
        .nav > li > a:hover{background:#39aef5;}
        .navbar-default .nav > li > a:hover,
        .navbar-default .nav > li > a:focus {  background-color: #39aef5;  color: white;  }
        .page-tabs a.active{background:#1571a9;color:#fff}
    </style>
    {/eq}
    {eq name="userinfo['utype']" value="site"}
    <style>
        .navbar-static-side,
        .nav-header{background:url('/public/system/img/index_bj2bj2.png') repeat #1571a9;}
        .nav > li.active {  border-left: 4px solid #19aa8d;  background:#1571a9;  }
        .nav > li > a{color:#fff;}
        .nav > li > a:hover{background:#39aef5;}
        .navbar-default .nav > li > a:hover,
        .navbar-default .nav > li > a:focus {  background-color: #39aef5;  color: white;  }
        .page-tabs a.active{background:#1571a9;color:#fff}
    </style>
    {/eq}
    {eq name="userinfo['utype']" value="operator"}
    <style>
        .navbar-static-side,
        .nav-header{background:url('/public/system/img/index_bj2bj2.png') repeat #0ba051;}
        .nav > li.active {  border-left: 4px solid #19aa8d;  background:#0ba051;  }
        .nav > li > a{color:#fff;}
        .nav > li > a:hover{background:#0eb65d;}
        .navbar-default .nav > li > a:hover,
        .navbar-default .nav > li > a:focus {  background-color: #0eb65d;  color: white;  }
        .page-tabs a.active{background:#0eb65d;color:#fff}
    </style>
    {/eq}
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <a class="navbar-minimalize" href="javascript:;" style="position:absolute;top:10px;left:10px;z-index:9999;color:#fff;">
        <i class="fa fa-bars"></i>
    </a>
    <nav class="navbar-default navbar-static-side">
        <div class="nav-close"><i class="fa fa-times-circle"></i></div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                    <li class="nav-header text-center">
                    <div class="dropdown profile-element">
                        <span><img class="img-circle" src="/public/system/img/syslogo.jpg" style="width:80px;height:80px;display:block;margin:0 auto;" /></span>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                               <span class="block m-t-xs"><strong class="font-bold">{$title}</strong></span>
                                <span class="text-muted text-xs block">{$userinfo.username}<b class="caret"></b></span>
                                </span>
                        </a>
                        <ul class="dropdown-menu animated fadeInRight m-t-xs">
                            {eq name="userinfo['utype']" value="system"}
                            <li><a href="/" target="_blank">网站首页</a></li>
                            {else/}
                            <li><a href="{:url('home/Index/index',['site_id'=>$siteId])}" target="_blank">网站首页</a></li>
                            {/eq}
                            <li><a class="J_menuItem" href="{:url('system/Index/initCache')}">初始化缓存</a></li>
                            <li><a class="J_menuItem" href="{:url('system/User/editpass')}">修改密码</a></li>
                            <li><a class="exitLogin" href="javascript:;">退出登录</a></li>
                        </ul>
                    </div>
                    <div class="logo-element" style="padding:35px 0  18px;">SYS</div>
                </li>
                {volist name="ruleList" id="one"}
                {eq name="one.is_son" value="1"}
                <li>
                    <a href="{$one.url}" title="{$one.title}">{notempty name="one.icon"}<i class="fa {$one.icon}"></i>{/notempty} <span class="nav-label">{$one.title}</span>
                        <span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        {volist name="one.children" id="two"}
                        {eq name="two.is_son" value="1"}
                        <li>
                            <a href="{$two.url}">{notempty name="two.icon"}<i class="fa {$two.icon}"></i>{/notempty} {$two.title} <span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                {volist name="two.children" id="three"}
                                <li><a class="J_menuItem" href="{$three.url}">{notempty name="three.icon"}<i class="fa {$three.icon}"></i>{/notempty} {$three.title}</a></li>
                                {/volist}
                            </ul>
                        </li>
                        {else/}
                        <li><a class="J_menuItem" href="{$two.url}" title="{$two.title}">{notempty name="two.icon"}<i class="fa {$two.icon}"></i>{/notempty} {$two.title}</a></li>
                        {/eq}
                        {/volist}
                    </ul>
                </li>
                {else/}
                <li>
                    <a class="J_menuItem" href="{$one.url}"  title="{$one.title}">
                        {notempty name="one.icon"}<i class="fa {$one.icon}"></i>{/notempty} <span class="nav-label">{$one.title}</span>
                    </a>
                </li>
                {/eq}
                {/volist}
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active J_menuTab" data-id="{:url('main')}">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span></button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive"><a>定位当前选项卡</a></li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll"><a>关闭全部选项卡</a></li>
                    <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>

            <div class="dropdown roll-nav roll-right J_tabHome">
                <a class="dropdown-toggle count-info" data-toggle="dropdown" href="javascript:;">
                    通知 <span class="label label-primary" id="statics-sum"></span>
                </a>
                <ul class="dropdown-menu dropdown-alerts">
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t1"></span>条未付款订单
                            <a href="{:url('system/ShopOrder/index',['order_genre'=>1])}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">未付款订单</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t2"></span>条待确认订单
                            <a href="{:url('system/ShopOrder/index')}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">待确认订单</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t3"></span>条待发货订单
                            <a href="{:url('system/ShopOrder/index',['order_genre'=>2])}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">待确认订单</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t4"></span>条退款单需处理
                            <a href="{:url('system/ShopOrderRefund/index',['order_genre'=>1])}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">待处理退款单</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t5"></span>条订单评价待处理
                            <a href="{:url('system/ShopGoodsGeval/index',['status'=>0])}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">订单评价</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t6"></span>条发票待开
                            <a href="{:url('system/ShopOrderInvoice/index',['invoice'=>1])}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">待开发票</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t7"></span>条待处理竞拍
                            <a href="{:url('system/ShopPromotionAuction/index')}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">待处理竞拍</span>
                            </a>
                        </div>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <div style="padding:4px 10px;">
                            <i class="fa fa-qq fa-fw"></i> 您有<span class="text-danger" id="statics-t8"></span>条待处理集采
                            <a href="{:url('system/ShopPromotionGroupbuy/index')}" class="J_menuItem">
                                <span class="pull-right text-muted text-primary small">待处理集采</span>
                            </a>
                        </div>
                    </li>
                </ul>
            </div>

            <a href="javascript:;" class="exitLogin roll-nav roll-right J_tabExit"><i
                    class="fa fa fa-sign-out"></i> 退出</a>
        </div>

        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" id="iframe" name="iframe" width="100%" height="100%" src="{:url('main')}" frameborder="0"
                    data-id="{:url('main')}" seamless></iframe>
        </div>

        <div class="footer">
            <div class="pull-right">&copy; 2016-2018 {$title} 版权所有
            </div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
<!-- 全局js -->
<script src="/public/plugins/bootstrap/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/public/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/public/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- 自定义js -->
<script src="/public/plugins/layer/layer.js"></script>
<script src="/public/system/js/hplus.js"></script>
<script src="/public/system/js/contabs.js"></script>
<script type="text/javascript">
    $(function () {
        $('.exitLogin').click(function () {
            layer.confirm('确定要退出登录吗？', {icon: 3, title: '提示消息'}, function (index) {
                layer.close(index);
                $.post("{:url('exitLogin')}", function (data) {
                    location.href = data.url;
                });
            });
        });
    })
</script>
</body>
</html>